<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base target="right">
    
    <title>首页</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="../../js/jquery-3.3.1.js"></script>
	<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
	<link href="../../css/bootstrap.min.css" rel="stylesheet">
  </head>
  
  <body>
  <script type="text/javascript">
  		$(document).ready(function(){
  			//window.parent.right.location.href='announcement.jsp';
  			$.ajax({
  				url:"${pageContext.request.contextPath}/announcement/findAll",
  				dataType:"json",
  				type:"post",
  				success:function(data, status){
  					for(var i = 0; i < data.data.length; i++)
  					{
  						$("#o").append("<li>"+"<a href='announcementdetail.jsp?aid="+data.data[i].aid+"'>"+data.data[i].aname+"</a>"+"&emsp;&emsp;&emsp;"+data.data[i].time+"</li>");
  					}		
  			}});
  		});
  </script>
  <div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<h3 class="text-center">
				公告栏
			</h3>
			<span>
				&emsp;
				<button type="button" class="btn btn-sm" onclick="window.parent.right.location.href='announcement.jsp'">发布公告</button>
			</span>
			<br/>
			<br/>
			<ol id="o">
				
			</ol>
		</div>
	</div>
</div>
</div>
  </body>
</html>
